1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module adw.SwipeableIF;
26 
27 private import adw.c.functions;
28 public  import adw.c.types;
29 
30 
31 /**
32  * An interface for swipeable widgets.
33  * 
34  * The `AdwSwipeable` interface is implemented by all swipeable widgets.
35  * 
36  * See [class@SwipeTracker] for details about implementing it.
37  *
38  * Since: 1.0
39  */
40 public interface SwipeableIF{
41 	/** Get the main Gtk struct */
42 	public AdwSwipeable* getSwipeableStruct(bool transferOwnership = false);
43 
44 	/** the main Gtk struct as a void* */
45 	protected void* getStruct();
46 
47 
48 	/** */
49 	public static GType getType()
50 	{
51 		return adw_swipeable_get_type();
52 	}
53 
54 	/**
55 	 * Gets the progress @self will snap back to after the gesture is canceled.
56 	 *
57 	 * Returns: the cancel progress, unitless
58 	 *
59 	 * Since: 1.0
60 	 */
61 	public double getCancelProgress();
62 
63 	/**
64 	 * Gets the swipe distance of @self.
65 	 *
66 	 * This corresponds to how many pixels 1 unit represents.
67 	 *
68 	 * Returns: the swipe distance in pixels
69 	 *
70 	 * Since: 1.0
71 	 */
72 	public double getDistance();
73 
74 	/**
75 	 * Gets the current progress of @self.
76 	 *
77 	 * Returns: the current progress, unitless
78 	 *
79 	 * Since: 1.0
80 	 */
81 	public double getProgress();
82 
83 	/**
84 	 * Gets the snap points of @self.
85 	 *
86 	 * Each snap point represents a progress value that is considered acceptable to
87 	 * end the swipe on.
88 	 *
89 	 * Returns: the snap points
90 	 *
91 	 * Since: 1.0
92 	 */
93 	public double[] getSnapPoints();
94 
95 	/**
96 	 * Gets the area @self can start a swipe from for the given direction and
97 	 * gesture type.
98 	 *
99 	 * This can be used to restrict swipes to only be possible from a certain area,
100 	 * for example, to only allow edge swipes, or to have a draggable element and
101 	 * ignore swipes elsewhere.
102 	 *
103 	 * If not implemented, the default implementation returns the allocation of
104 	 * @self, allowing swipes from anywhere.
105 	 *
106 	 * Params:
107 	 *     navigationDirection = the direction of the swipe
108 	 *     isDrag = whether the swipe is caused by a dragging gesture
109 	 *     rect = a pointer to a rectangle to store the swipe area
110 	 *
111 	 * Since: 1.0
112 	 */
113 	public void getSwipeArea(AdwNavigationDirection navigationDirection, bool isDrag, out GdkRectangle rect);
114 }